import request from '@/utils/request'

export function readFaultRecord(data) {
  return request({
    url: '/api/device-fault-record/read-fault-record',
    method: 'post',
    data
  })
}

export function listDeviceFaultRecords(params) {
  return request({
    url: '/api/device-fault-record/list-device-fault-records',
    method: 'get',
    params: params
  })
}
export function pageDeviceFaultRecords(params) {
  return request({
    url: '/api/device-fault-record/page-device-fault-records',
    method: 'get',
    params: params
  })
}

export function addDeviceFaultRecord(data) {
  return request({
    url: '/api/device-fault-record/add-device-fault-record',
    method: 'post',
    data
  })
}

export function updateDeviceFaultRecord(data) {
  return request({
    url: '/api/device-fault-record/update-device-fault-record',
    method: 'post',
    data
  })
}

export function deleteDeviceFaultRecord(id) {
  return request({
    url: '/api/device-fault-record/delete-device-fault-record/' + id,
    method: 'delete',
  })
}
